package com.dymedia.aibo.app;

import android.content.Context;

import com.dymedia.aibo.app.utils.Utils;

public class Product {
    public interface ProductInfo{
        String api();
        String regUrl();
        String payUrl();
    }

    public static class H9YC3JZ0 implements ProductInfo {
        @Override
        public String api() { return "http://59.124.143.229:3000"; }
        @Override
        public String regUrl() { return ""; }
        @Override
        public String payUrl() { return ""; }
    }

    public static class TPLDHEZP implements ProductInfo {
        @Override
        public String api() {
            return "http://195.154.102.249:3000";
        }
        @Override
        public String regUrl() {
            return "https://www.oraoplay.com/myaccount/register.php?mac=";
        }
        @Override
        public String payUrl() { return "https://www.oraoplay.com/myaccount/pay.php?pmac="; }
    }

    public static class REQWOXVC implements ProductInfo {
        @Override
        public String api() {
            return "http://195.154.102.249:3000";
        }
        @Override
        public String regUrl() { return "https://www.hub-telecoms.com/myaccount/register.php?mac="; }
        @Override
        public String payUrl() { return "https://www.hub-telecoms.com/myaccount/pay.php?pmac="; }
    }

    public static class YPPGLSYP implements ProductInfo {
        @Override
        public String api() {
            return "http://195.154.102.249:3000";
        }
        @Override
        public String regUrl() { return "https://www.hub-telecoms.com/myaccount/register.php?mac="; }
        @Override
        public String payUrl() { return "https://www.hub-telecoms.com/myaccount/pay.php?pmac="; }
    }

    public static class HGOTFRKF implements ProductInfo {
        @Override
        public String api() {
            return "http://62.210.110.184:3000";
        }
        @Override
        public String regUrl() { return "https://www.oraoplay.com/asia/register.php?mac="; }
        @Override
        public String payUrl() { return "https://www.oraoplay.com/asia/pay.php?pmac="; }
    }

    private static ProductInfo mProduct=null;
    public static ProductInfo getProduct(Context context) {
        if (mProduct == null) {
            if ("TPLDHEZP".equals(Utils.getCode(context))) {
                mProduct = new TPLDHEZP();
            } else if ("REQWOXVC".equals(Utils.getCode(context))) {
                mProduct = new REQWOXVC();
            } else if ("YPPGLSYP".equals(Utils.getCode(context))) {
                mProduct = new YPPGLSYP();
            } else if ("HGOTFRKF".equals(Utils.getCode(context))) {
                mProduct = new HGOTFRKF();
            } else {
                mProduct = new H9YC3JZ0();
            }
        }
        return mProduct;
    }
}
